package com.travel.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

@ApiModel
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HotelOrderDto {
    @ApiModelProperty(value = "订单id",example = "1")
    private String orderId;
    @ApiModelProperty(value = "地区id",required = true,example = "0321")
    private Integer cityId;

    @ApiModelProperty(value = "身份证号",required = true,example = "322111201212211221X")
    private String idNumber;
    @ApiModelProperty(value = "出行人手机号",required = true,example = "12222222222")
    private String phonenumber;

    @ApiModelProperty(value = "酒店名",required = true,example = "携程酒店")
    private String hotelName;

    @ApiModelProperty(value = "酒店位置",required = true,example = "32")
    private String hotelAddress;

    @ApiModelProperty(value = "房间id",required = true,example = "21")
    private Integer hotelRoomType;

    @ApiModelProperty(value = "入住时间",required = true,example = "2012-12-21")
//    @JsonDeserialize(using = LocalDateDeserializer.class)
//    @JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDate checkInTime;

    @ApiModelProperty(value = "退房时间",required = true,example = "2022-12-21")
//    @JsonDeserialize(using = LocalDateDeserializer.class)
//    @JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDate checkOutTime;

    @ApiModelProperty(value = "订房数量",required = true,example = "12")
    private Integer count;

    @ApiModelProperty(value = "住客名",required = true,example = "王齐")
    private String guestName;

    @ApiModelProperty(value = "邮箱",required = true,example = "123456789@gmail.com")
    private String email;

    @ApiModelProperty(value = "预计到店时间",example = "2020-01-01")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date expectTime;

    @ApiModelProperty(value = "特别要求",required = true,example = "希望房子里给我放几个女鬼")
    private String specialRequirement;

}
